export default {
    getDataZoom(arg) {
        const {start, end} = arg;
        return [
            {
                type: 'inside',
                xAxisIndex: [0],
                start: start,
                end: end
            },
            {
                show: true,
                xAxisIndex: [0],
                type: 'slider',
                // top: '85%',
                start: start,
                end: end
            }
        ]
    },
    handleSetting(arg) {
        const {areaStyle} = arg;
        let series = {};
        if (areaStyle) series.areaStyle = areaStyle;
        return series;
    },
    scatterData(columns, rows) {
        columns = Array.isArray(columns) ? columns : [columns];
        rows = Array.isArray(rows) ? rows : [rows];
        let scatterData = rows.map((row, index) => {
            return [columns[index], row];
        })
        return scatterData;
    }
}
